Day 1 - Getting help
– Help me, Obi-Wan Kenobi. You are my only hope.
Star Wars (1977)
The most important part of a software is the documentation. Sadly, often our software doesn’t have
good documentation, as “the fun” is in the code. We mostly enjoy developing a program that does
something, not writing boring text. Fortunately for us, the Unix system and the people working in
that environment have a great culture of documentation, and so the first thing you have to learn is
how to find and read help on the commands you will learn.
Welcome to the Unix manual pages, or man pages for short. Whenever you need help on a command
you can run
$ man <command>
and enter a text-only (but very powerful, mind it) help system. To learn how to navigate the system
let’s get help on a rather simple command that we will learn shortly, echo.
$ man echo
If you are running Linux in a Docker container and you followed the simple solution
you will not have man pages installed in your system, so you need to read them at
https://manpages.ubuntu.com/and the search form at the top right of the page.
First of all, let me teach you some of the basic fundamentals of man page driving. You can move
through the documentation with your arrow keys, down and up, and with the page down and page
up keys to quickly scroll the whole page. Please note that, since manual pages are read-only, there
is no cursor, just a current line, which is the topmost one.
A nice help text at the bottom of the screen lets you know that this it
Manual page echo(1) line 1/68 51% (press h for help or q to quit)
Quitting programs can be surprisingly complex at times (ask any vi novice user), but man exits to
the system with a simple q for quit. Try it, then enter the manual page for echo again. Phew! At
least we won’t be trapped here forever.